package com.iring.domain.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.authy.AuthyApiClient;
import com.iring.domain.config.prop.SMSProperties;

/**
 * paypal配置
 *
 * @author wanggan
 */
@Configuration
@ConditionalOnClass(SMSProperties.class)
public class SMSConfig {

    @Autowired
    SMSProperties smsProperties;

    @Bean
    public AuthyApiClient authyApiClient() {
        return new AuthyApiClient(smsProperties.getApikey());
    }
}
